﻿#region

using System;
using System.Reflection;

#endregion

namespace MessageTypeDescriber.Xml.Members
{
    [Serializable]
    public class FieldDescription : MemberDescription
    {
        protected FieldDescription(): base(null)
        {
        }

        public FieldDescription(FieldInfo fieldInfo) : base(fieldInfo)
        {
            Name = fieldInfo.Name;
            ReturnType = new TypeDescription(fieldInfo.FieldType);
        }

        public override string MemberType
        {
            get { return "Field"; }
        }

        public override string Signature
        {
            get { return ReturnType.Signature + " " + Name; }
        }
    }
}